<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="__TMPL__style/group-style.css" />
<link type="text/css" rel="stylesheet" href="__TMPL__style/supply-style.css" />
<!-- <link href="__TMPL__style/Common.css" rel="stylesheet" type="text/css" media="screen" />-->
<link href="__TMPL__style/jquery.msgbox.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
<!--<script type="text/javascript" src="__ROOT__/Public/Js/core.js"></script>-->
<!--<script type="text/javascript" src="/pw8/js/core/core.js"></script>-->
<script type="text/javascript" src="__TMPL__js/jquery.dragndrop.js"></script>	
<script type="text/javascript" src="__TMPL__js/jquery.msgbox.js"></script>
<title>{$title}搜索列表页 - EHS中国</title>
</head>

<body>
 <layout name="Public:header0523" cache="1" />
<div class="main"> 

<div class="container">
<div class="path-sub-nav">您所在位置:<a href="/index.html">首页</a> &gt;符合<font style="color:red">"{$keyWord}"</font>关键词的"{$title}"搜索结果，共<span style="color:red">{$count}</span> 条记录</div>
<!--<div class="search-submenu"></div>-->
<div class="search-list">
	<div class="search-list-title">结果显示</div>
    <div class="search-group-cont">
	    <volist name='list' id='item'>
    	<dl>
   	  	  <dt><a href="/main/public.php/circle/group/cyid/{$item.id}" target="_blank"><img src="{$item['icon']}" width="100" /></a></dt>
            <dd>
            	<h4>群组名称：<a href="/main/public.php/circle/group/cyid/{$item.id}" target="_blank">{$item['cname']}</a></h4>
                <p>创建时间：<?=date('Y-m-d/H:i:s',$item['createtime'])?></p>
                <p>群主：<a href="/main/public.php?s=/column/index/uid/{$item.uid}" target="_blank">{$item.admin}</a></p>
                <p>会员：{$item.members}</p>
                <p>帖子：{$item.aNum}</p>
                <div class="btn-jion">
				<if condition="$item.isMember eq false">				
				<span id="cy_{$item.id}"><a href="#" onclick="return joinApp({$item.id});">加入群组</a></span>
				<else/>
				<span id="cy_{$item.id}"><a href="#" class='disabled' onclick="return false;">已加入</a></span>
				</div>				
				</if>
            </dd>
            <div class="clear"></div>
        </dl>
		</volist> 
		<div class="default_page" style="clear:both;padding:10px auto;margin:10px auto;text-align:center">{$page}</div>
        <div class="clear"></div>
    </div>
</div>

<div class="clear"></div>
</div>
<div class="footer">
    <layout name="Public:footer" cache="0" /></div>
 </div>
<script>
function joinApp(id){
     if(confirm('确定要加入该群组么？')){
	   $.getJSON('/main/public.php?s=/circle/join/isAjax/1/cyid/'+id,
	   		 function(data){
		     if(data.result=='1')
	           $('#cy_'+id).html('<a href="#" class="disabled" onclick="return false;">已加入</a>'); 
			 if(data.result=='0')
			   alert('您还没登录，请登录后再试');
			 if(data.result=='2')
			   alert('您已经加入过该群组了')    
		 }		  
		);	
		} 
		return false; 
	  }
	</script>
</body>
</html>